<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org">
	  <head>
	  	<title>TacoCloud</title>
	  	<style>
	  		*{
	  			padding:0;
	  			margin:0;
	  			box-sizing:border-box;
	  		}
	  		
	  		.A1{
	  			width:100%;
	  			height:400px;
	  			margin:auto auto;	  			
				display: flex;
                justify-content: center;
                align-items: center;
	  		}
	  		
	  		.A1 p{
	  			color:black;
	  			font-size:70px;
	  			font-weight:400;
	  		}
	  		
	  		.A2{
	  			width:100%;
	  			height:200px;
	  			margin:auto auto;
	  			position:relative;
				display: flex;
                justify-content: center;
                align-items: center;
                margin-top:200px;
                 
	  		}

			.A2 input{
                border: rgb(145, 144, 144) 2px solid;
           		background: none;
               	width:150px;
			  	height:50px;
				position: absolute;			        
            }
			 .zhuce{
			 border: rgb(145, 144, 144) 2px solid;
           	 background: none;
             width:150px;
			 height:50px;
			 position: absolute;
			 top:600px;	
			}
	  		
	  		.B{
	  		   font-size:22px;
	  		   
	  		   
	  		}
	  		.ID{
	  			height:30px;
	  			width:300px;
	  		}
	  		.BB{
	  		width:100%;
	  		height:300px;
	  		display: flex;
            justify-content: center;
            align-items: center;
	  		}
			.C{
			width:300px;
			height:40px;
			}

	  	</style>
	  	<script type="text/javascript">
	  	  function bit(){
	  		var myId=document.getElementById("myname").value;
	  		var myPassword=document.getElementById("mypassword").value;
	  		console.log(myId);
	  		console.log(myPassword);
	  		if(myId==""||myPassword==""){
	  			alert("用户名或密码不能为空！")
	  		}else{
		  		document.getElementById("myForm").submit();
		  		var SelectId=document.getElementById("Id").value;
		  		var SelectPassword=document.getElementById("Password").value;
		  		if(SelectId==myId&&SelectPassword==myPassword){  			
				   window.location.href="http://localhost:8080/home/PersonalCenter";	  			
		  		}else{
		  			alert("输入正确的学号和密码！");
		  		}	  			
	  		}
	  		
	  		  
	  	  }
	  	  function zhuce(){
	  		 window.location.href="http://localhost:8080/home/Register";	
	  	  }
	  	</script>
	  	
	  </head>
	  
	  <body>
	    <div class=A1>
	     	<p>欢迎使用学生选课系统</p>
	    </div>
	    <div class=BB>
	      <form id="myForm">
	      	  <span class="B">学号：</span>
              <input type="text"  name="myname" class="C" id="myname" value="">
              </br>
              <span class="B">密码：</span>
              <input type="password"  name="mypassword" class="C" id="mypassword" value="">
              </br>
			  <div class=A2>
			    <input type="button" id="open" value="确定" onclick="bit()">
			  </div>	
          </form>
			    <button class="zhuce" onclick="zhuce()">注册</button>
	    </div>

		
	    
	    <input type="hidden" id="Id" th:value='${load.getId()}'>
	    <input type="hidden" id="Password" th:value='${load.getPassword()}'>
	  </body>
	
</html>